Skip to content

#16: add spring security DSL #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jonasbark
Copy link
Contributor

Fixes #16

This pull requests adds the possibility to configure Spring Boot Security via Kofu:

           security {
                http {
                    headers()
                    logout()
                }
            }
            webFlux {
                webFluxSecurity()
            }

I'm open to feedback, mostly regarding what DSL could be added. As mentioned in Kotlin Slack, let's have a quick chat about it on Spring I/O!

Jonas Bark added 6 commits May 6, 2019 14:21
…ecurity

* commit 'f4beabf3356120a397be161d1c3195296b5a2d67': (22 commits)
  Fix R2DBC transitive dependencies
  Upgrade to Kotlin 1.3.31
  Leverage Spring Boot 2.2 JUnit 5 support
  Update README
  Add WebMvc converters, cors and mustache support
  Fix WeMvc configuration
  Update R2DBC support
  Make LoggingDsl extending AbstractDsl
  Add kofu-servlet-validation sample
  Fixed the name of the jar inside the build.sh [kofu-coroutines-validation sample]
  Update according to latest Spring changes
  Comment broken tests for now
  Update according to latest Reactor changes
  Polishing
  Polishing
  Add YAVI-based validation samples
  Update README
  Update README
  Update README
  Add kofu-servlet-minimal Maven publication task
  ...
…ecurity

* commit '056b2351a066b1741f7ce50e173c3d667dbf9357':
  Polishing
  Polishing
  Remove manual GraalVM native image configuration
  Focus GraalVM native image support on spring-projects/spring-framework#22968
  Avoid exposing AbstractDsl#initialize in public API
  Add tests for the R2DBC mapping to simple types
  Fix documentation
  Avoid specifying reactor-kotlin-extensions version
  Fix R2DBC transitive dependencies
…ecurity

* commit '58fbd40f6150fe2852dc38f30aa2a2089a3d5644':
  Fix warning
  Swtich to 0.2.BUILD-SNAPSHOT version
  Release 0.1 version
  Upgrade to Spring Boot 2.2.0.M3
  Fix kotlin-servlet-minimal
  Polishing
  Polishing
  Improve documentation
  Add documentation badge
@sdeleuze
Copy link
Collaborator

sdeleuze commented Jun 6, 2019

@jonasbark Thanks for this contribution, this is a great start. You will find in my branch some small changes, could you integrate them in this PR (I have rebased the commits on top of master so maybe get my branch and do changes on top of it)?

Also please use tabs for indent, I know that's not everybody taste but that"s what we use in Spring ;-)

I think next steps are:

  • Adding integration tests in kofu module
  • Adding a sample application
  • Add support for Spring MVC
  • Support more features in the security DSL

Do you have some time to move it forward?

@jonasbark
Copy link
Contributor Author

Our company will focus on Spring Security soon so I'll be able to see which DSLs might be handy to have. A rough estimate would be four weeks from now.

@eanekrasov
Copy link
Contributor

Any progress?

@sdeleuze
Copy link
Collaborator

We are working on a built-in Spring Security Kotlin DSL which should be available on Spring Security side, I will update this PR when it will be available.

@jonasbark
Copy link
Contributor Author

Sounds good 👍 I caught up with work by now so I'm available to update the PR as well (once the 'offical' DSL is testable)

@sdeleuze
Copy link
Collaborator

sdeleuze commented Oct 3, 2019

https://github.com/spring-projects-experimental/spring-security-kotlin-dsl is about to be available ;-)

@pull-vert
Copy link
Contributor

According to Spring security Kotlin DSL :

The native Kotlin DSL for servlet based applications has been integrated into Spring Security as of version 5.3.0.M1. Servlet based applications no longer need to add this (spring-security-kotlin-dsl) project as an additional dependency. Reactive applications should continue to use this project for a native Kotlin DSL

So this subject is back, at first for servlet based apps, Reactive seems to be nearly ready too !

@guitcastro
Copy link

So there is an ETA for kotlin security dsl to be integrated into Spring Security?

@pull-vert
Copy link
Contributor

@guitcastro Kotlin security DSL is now fully integrated in Spring Security 5.4.0-M1 milestone 1 release !

@sdeleuze
Copy link
Collaborator

This PR will be replaced by integration of this official support via 16.

@sdeleuze sdeleuze closed this Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce a security { } DSL
5 participants